 # 1.导入tutle库
import turtle
# 3.赋值turtle.Pen()函数给 t
t = turtle.Pen() 
# 4.建立coloers列表, 存储red,yellow,blue,green这四个元素
colors = ["red","yellow","blue","green","black"]
# 5.进行100次循环
for index in range(100):  
    # 6.每次执行循环都对4进行取余运算
    t.pencolor(colors[index % 5])  
    # 7.海龟向前移动x的像素单位
    t.forward(index *3)
    # 8.海龟左转90°
    t.left(90)  
# 2.点击退出
turtle.exitonclick()
